//package ${location}.test.config.redis;
//
//import org.springframework.cache.annotation.CachingConfigurerSupport;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.data.redis.connection.RedisConnectionFactory;
//import org.springframework.data.redis.core.RedisTemplate;
//import org.springframework.data.redis.listener.RedisMessageListenerContainer;
//import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
//import org.springframework.data.redis.serializer.StringRedisSerializer;
//
///**
// * Redis配置类
// *
// * @author ${author}
// */
//@Configuration
//public class RedisConfig extends CachingConfigurerSupport {
//	/**
//	 * 自定义序列化器
//	 *
//	 * @param connectionFactory
//	 * @return
//	 */
//	@Bean
//	public RedisTemplate<Object, Object> redisTemplate(RedisConnectionFactory connectionFactory) {
//		RedisTemplate<Object, Object> redisTemplate = new RedisTemplate<>();
//		//默认的Key序列化器为：JdkSerializationRedisSerializer
//		redisTemplate.setKeySerializer(new StringRedisSerializer());
//		redisTemplate.setHashKeySerializer(new StringRedisSerializer());
//		redisTemplate.setConnectionFactory(connectionFactory);
//		//value序列化
//		Jackson2JsonRedisSerializer jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer(Object.class);
//		redisTemplate.setValueSerializer(jackson2JsonRedisSerializer);
//		//value hashmap序列化
//		redisTemplate.setHashValueSerializer(jackson2JsonRedisSerializer);
//		return redisTemplate;
//	}
//
//	/**
//	 * 监听连接工厂
//	 *
//	 * @param redisConnectionFactory
//	 * @return
//	 */
//	@Bean
//	public RedisMessageListenerContainer container(RedisConnectionFactory redisConnectionFactory) {
//		RedisMessageListenerContainer container = new RedisMessageListenerContainer();
//		container.setConnectionFactory(redisConnectionFactory);
//		return container;
//	}
//
//}